package com.ysd.lis.controller;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.WkTestSmall;
import com.ysd.lis.request.CreateSmallQuestionParam;
import com.ysd.lis.service.WkTestSmallService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 考试-小题表 前端控制器
 * </p>
 *
 * @author LiuQi
 * @since 2024-04-02
 */
@RestController
@RequestMapping("/wk/test/small")
public class WkTestSmallController extends BaseController {


    @Autowired
    WkTestSmallService wkTestSmallService;

    @GetMapping("/getSmallSubjectList")
    public Result getSmallSubjectList(@RequestParam("paperId") String paperId, @RequestParam("bigId") String bigId) {
        return wkTestSmallService.getSmallSubjectList(paperId, bigId);
    }

    @PostMapping("/addTestSmallSubject")
    public Result addTestSmallSubject(@RequestBody WkTestSmall wkTestSmall) {
        return wkTestSmallService.addTestSmallSubject(wkTestSmall);
    }

    @PostMapping("/editTestSmallSubject")
    public Result editTestSmallSubject(@RequestBody WkTestSmall wkTestSmall) {
        return wkTestSmallService.editTestSmallSubject(wkTestSmall);
    }

    @PostMapping("/removeTestSmallSubject")
    public Result removeTestSmallSubject(@RequestBody WkTestSmall wkTestSmall) {
        return wkTestSmallService.removeTestSmallSubject(wkTestSmall);
    }
    @PostMapping("/createSmallByKnowledgeIds")
    public Result createSmallByKnowledgeIds(@RequestBody CreateSmallQuestionParam createSmallQuestionParam) {
        return wkTestSmallService.createSmallByKnowledgeIds(createSmallQuestionParam);
    }

}
